import 'package:flutter/material.dart';
import 'package:lib_uikit/widgets/dialog/gt_funds_password_dialog_widget.dart';

import '../../generated/l10n.dart';
import 'gt_center_dialog_widget.dart';

class GTFundsPasswordDialog {
  /// 未设置资金密码样式
  static Future<dynamic> showNoPasswordDialog(
    BuildContext context,
    String title,
    String contentText,
    String buttonText, {
    GestureTapCallback? onLeftTap,
    GestureTapCallback? onRightTap,
  }) {
    return showDialog(
      context: context,
      barrierDismissible: false,
      barrierColor: const Color.fromRGBO(0, 0, 0, 0.5),
      builder: (context) {
        return GTFundsPasswordDialogWidget(
          title: title,
          contentText: contentText,
          rightText: buttonText,
          onLeftTap: onLeftTap,
          onRightTap: onRightTap,
          isShowClose: true,
        );
      },
    );
  }

  ///展示验证密码弹窗
  static Future<dynamic> showVerifyPasswordDialog(
    BuildContext context,
    String title,
    String leftText,
    String rightText,
    String switchTips, {
    GestureTapCallback? onLeftTap,
    GestureTapCallback? onRightTap,
  }) {
    return showDialog(
      context: context,
      barrierDismissible: false,
      barrierColor: const Color.fromRGBO(0, 0, 0, 0.5),
      builder: (context) {
        return GTFundsPasswordDialogWidget(
          title: title,
          leftText: leftText,
          rightText: rightText,
          onLeftTap: onLeftTap,
          onRightTap: onRightTap,
          isShowClose: true,
          showVerifyPassword: true,
          switchTips: switchTips,
        );
      },
    );
  }
}
